package vn.smartoffice.promail.entity;

import java.beans.Transient;
import java.util.Date;

import lombok.Data;
import lombok.EqualsAndHashCode;

import org.joda.time.DateTime;

import vn.smartoffice.entity.AbstractModel;
import vn.smartoffice.entity.User;

@Data
@EqualsAndHashCode(exclude = {"user", "folder"} ,callSuper = true)
public class MailItem extends AbstractModel {
	private static final long serialVersionUID = -7736659750632401590L;
	private User user;
	private MailFolder folder;
	private String senderEmail;
	private String senderName;
	private String title;
	private String content;
	private DateTime receivedDate;
	private boolean important;
	private boolean checkRead;

	@Transient
	public Date getDate() {
		return receivedDate.toDate();
	}
}
